package cn.com.guage.dtm.huawei;

import java.util.Scanner;

public class HJ5_进制转换 {
    public static void main(String[] args) {
        method1();
    }

    private static void method1(){
        Scanner in = new Scanner(System.in);
        String next = in.next();
        String str = next.substring(2);
        Integer result =  Integer.parseInt(str,16);
        System.out.println(result);
    }

}
